<template>
	<view>
		<view v-if="detail.preferentialMap">


			<view class="full" v-for="(item,index) in detail.preferentialMap.giftpreferentialList" :key="index">
				<view class="f-header">{{item.giftPreferentialName}}</view>
				<view class="text-title">
					<text class="text-large" v-for="(items,ind) in item.giftpreferentialItemList" :key="items.id">
						<text v-if="items.giftPreferentialItem" v-for="itemss in items.giftPreferentialItem"
							:key="itemss.id">{{itemss.description}}</text>
						<text else>{{items.description}}</text>

					</text>
				</view>
			</view>
			<view class="full" v-for="(item,index) in detail.preferentialMap.pricepreferentialList" :key="item.endDate">
				<view class="f-header">{{item.pricePreferentialName}}</view>
				<view class="text-title">
					<text class="text-large" v-for="(items,ind) in item.pricePreferentialItemList"
						:key="items.id">满{{items.consumerSpending}}元优惠{{items.fireNum}}元,满{{items.consumerPieces}}{{detail.unit_name}}赠{{items.giveNum}}{{detail.unit_name}},折扣{{items.discountNum}}</text>
				</view>
			</view>
			<view class="full" v-for="(item,index) in detail.preferentialMap.postlistMap" :key="item.id">
				<view class="f-header">包邮活动</view>
				<view class="text-title">
					<text class="text-large">{{item.postActivityName}}</text>
				</view>
			</view>
		</view>
		<view class="full" v-if="detail.groupBuying">
			<view class="f-header">{{detail.groupBuying.name}}</view>
			<view class="text-title">
				<text class="text-large">{{detail.groupBuying.groupNumbers}}件成团</text>
			</view>
			 
		</view>
		<progress v-if="detail.groupBuying" :percent="detail.groupBuying.groupBuyingRate" show-info activeColor="red" active stroke-width="8" />
		

	</view>

</template>

<script>
	export default {
		name: "",
		components: {

		},
		data() {
			return {
				detail: {
					preferentialMap: {
						giftpreferentialList: [],
						pricepreferentialList: []
					}
				},
			}
		},
		methods: {
			setDatas(val) {
				this.detail = val
			},
		}


	}
</script>

<style scoped lang="less">
	.full {
		display: flex;
		justify-content: flex-start;
		margin-top: 45upx;

		.f-header {
			// width: 64upx;
			// height: 64upx;
			// background: rgba(235, 74, 105, 1);
			// border-radius: 32upx;
			font-size: 20upx;
			font-family: Microsoft YaHei;
			font-weight: 400;
			color: #f00;
			display: flex;
			justify-content: center;
			align-items: center;
			margin-right: 15upx;
		}


		.text-title {
			text {
				display: block;
			}

			.text-large {
				font-size: 23upx;
				font-family: Microsoft YaHei;
				font-weight: 400;
				color: rgba(102, 102, 102, 1);
				line-height: 38upx;
			}

			.text-small {
				font-size: 17upx;
				font-family: Microsoft YaHei;
				font-weight: 400;
				color: rgba(136, 136, 136, 1);
				line-height: 25upx;
			}
		}
	}
</style>
